Image processing apparatus, image forming apparatus and recording medium

ABSTRACT

An image processing apparatus includes a compression processing section that compresses image data obtained by reading a plurality of documents into a file, a specifying section that specifies an amount of information for an image of each of the plurality of documents, and a compression size calculation section that calculates a size after compression of an image of each document in accordance with the specified amount of information. The compression processing section compresses the image by using the size after compression calculated by the compression size calculation section.

CROSS-REFERENCE TO RELATED APPLICATIONS

This Nonprovisional application claims priority under 35 U.S.C. §119(a)on Patent Application No. 2013-128932 filed in Japan on Jun. 19, 2013,the entire contents of which are hereby incorporated by reference.

BACKGROUND

The present invention relates to an image processing apparatus thatincludes a compression processing section for compressing image dataobtained by reading a plurality of documents into a file, an imageforming apparatus that includes the image processing apparatus, and arecording medium that records a computer program for realizing the imageprocessing apparatus.

DESCRIPTION OF THE RELATED ART

When image data are made into electronic data obtained by readingdocuments with a scanner and electronic files are attached to an e-mailto be sent, it is desirable to compress images into sizes that areattachable to an e-mail at the time of creating electronic files becausethe capacity for attaching files to an e-mail is restricted. Forexample, it is possible to specify a size after compression in advanceand compress it by using, for example, a compression method such asJPEG2000 as the system for realizing such requirement. In addition, amethod for compressing a plurality of documents efficiently is disclosed(see Japanese Patent Application Laid-Open No. 2007-158510).

SUMMARY

However, with regard to the method described in Japanese PatentApplication Laid-Open No. 2007-158510, the method improves thecompression efficiency in a case of having common parts over a pluralityof documents. In a case having no common parts over a plurality ofdocuments, compression will be just as ordinary, causing a problem thatcannot improve efficiency. In addition, a method for determining a sizeof each document when having no common parts over a plurality ofdocuments is not disclosed.

Moreover, it is assumed that, in a case where images over a plurality ofpages obtained by reading a plurality of documents are compressed into afile having a predetermined size designated beforehand, a size aftercompression of an image at each page is assigned equally and then theimage is compressed. In this case, if the description amount such ascharacters and figures of each page is different, there is a problemthat an image of a page with more description amount has largerdeterioration than an image of a page with lesser description amount.

In view of such circumstances, an object of the present invention is toprovide an image processing apparatus that can equalize image qualitywhen compressing images over a plurality of pages, an image formingapparatus that includes the image processing apparatus, and a recordingmedium that records a computer program for realizing the imageprocessing apparatus.

An image processing apparatus according to the present inventionincludes a compression processing section for compressing image dataobtained by reading a plurality of documents into a file. The imageprocessing apparatus is characterized by including a specifying sectionfor specifying an amount of information of an image of each of theplurality of documents and a compression size calculation section forcalculating a size after compression of the image in accordance with theamount of information specified by the specifying section. The imageprocessing apparatus is characterized in that the compression processingsection compresses the image data by using the size after compressioncalculated by the compression size calculating section.

An image processing apparatus according to the present inventionincludes a pixel number calculation section for calculating the numberof text pixels and the number of chromatic pixels of each image based onpixel values of a plurality of pixels constituting the image and aweighting section for multiplying the number of text pixels by a firstweighting coefficient and multiplying the number of chromatic pixels bya second weighting coefficient to add the results of the multiplication.The image processing apparatus is characterized in that the specifyingsection specifies a value obtained by the weighting section as theamount of information.

An image processing apparatus according to the present inventionincludes a document type determination section for determining whether adocument corresponding to an image is a color document or ablack-and-white document. The specifying section specifies the result,which is determined by the document type determination section, as theamount of information.

An image processing apparatus according to the present invention ischaracterized by including the image processing apparatus according toany one of the above-mentioned inventions and an image forming sectionfor forming an image based on the file compressed by the imageprocessing apparatus on a sheet.

A non-transitory computer-readable recording medium according to thepresent invention recording a computer program for compressing imagedata obtained by reading a plurality of documents into a file thatcauses a computer to execute a step of specifying an amount ofinformation of an image of each of the plurality of documents and a stepof calculating a size after compression of the image in accordance withthe specified amount of information, and a step of compressing the imagedata by using the calculated size after compression.

According to the present invention, it is possible to equalize the imagequality of an image at each page in a case of compressing images over aplurality of pages.

The above and further objects and features will more fully be apparentfrom the following detailed description with accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an example of the configuration of animage forming apparatus according to Embodiment 1.

FIG. 2 is a block diagram showing an example of a configuration of adocument type automatic discrimination section according to Embodiment1.

FIG. 3A is an explanatory drawing showing an example of a minimum valuehistogram of background pixels by a background judgment sectionaccording to Embodiment 1.

FIG. 3B is an explanatory drawing showing an example of a minimum valuehistogram of background pixels by a background judgment sectionaccording to Embodiment 1.

FIG. 4 is a flowchart showing an example of a processing procedure fordetermining a document type by a document type automatic discriminationsection according to Embodiment 1.

FIG. 5 is a flowchart showing an example of a processing procedure fordetermining a color document by the document type automaticdiscrimination section according to Embodiment 1.

FIG. 6 is a flowchart showing an example of a procedure for processingrestart by a control section according to Embodiment 1.

FIG. 7 is an explanatory drawing showing an example of a method forspecifying an amount of information by a compression size calculationsection according to Embodiment 1.

FIG. 8 is an explanatory drawing showing an example of a method forcalculating a compression size by the compression size calculationsection according to Embodiment 1.

FIG. 9 is an explanatory drawing showing an example of the number ofarea pixels in the images over a plurality of pages.

FIG. 10 is a schematic view showing description amount of images over aplurality of pages.

FIG. 11 is an explanatory drawing showing an example of the compressionsizes of images over a plurality of pages.

FIG. 12 is a flowchart showing an example of a processing procedure forthe compression size calculation section according to Embodiment 1.

FIG. 13 is an explanatory drawing showing an example of a method forspecifying an information amount by a compression size calculationsection according to Embodiment 2.

FIG. 14 is an explanatory drawing showing an example of a method forcalculating a compression size by the compression size calculationsection according to Embodiment 2.

FIG. 15 is an explanatory drawing showing an example of the compressionsizes of images over a plurality of pages according to Embodiment 3.

FIG. 16 is a block diagram showing a computer hardware according toEmbodiment 1 through 3.

DETAILED DESCRIPTION

Embodiment 1

The present invention is described hereinafter based on the drawingindicative of an embodiment. FIG. 1 is a block diagram showing anexample of the configuration of an image forming apparatus according toEmbodiment 1. As shown in FIG. 1, the image forming apparatus includesan image processing apparatus 100, an image input apparatus 201, animage output apparatus 202, an image display apparatus 203, a controlsection 101, a storage device 102 and a transmission/reception device103.

The image forming apparatus according to the embodiment is a digitalcolor multi-function printer having different modes such as a copiermode, a print mode, a facsimile transmission mode, a facsimile receptionmode, an image transmission mode and the like. When the user selects anymode among these modes, the image forming apparatus executes theselected mode.

The image transmission modes are described hereinafter according to thepresent embodiment. The image transmission mode refers to, for example,(1) a mode (scan to e-mail mode) that the images (also called imagedata) obtained by reading a document are attached to an e-mail and thentransmitted to the designated address; (2) a mode (scan to ftp mode)that the images obtained by reading a document are sent to a folderdesignated by a user; (3) a mode (scan to usb mode) that the imagesobtained by reading a document are sent to a USB memory or the likeattached to the image forming apparatus.

The image input apparatus 201 is configured by a scanner sectionprovided with, for example, a CCD (Charged Coupled Device) line sensorand converts a reflective image from a document to an electrical RGB (R;red, G; green, B; blue) signal. The color image signal (RGB analogsignal) inputted by the CCD line sensor is converted to a digital signalby an A/D (Analog-Digital) conversion section, and various kinds ofdistortion generated by the lighting system, image focusing system andimage sensing system of the image input apparatus 201 is removed by ashading correction section.

The image output apparatus 202 functions as an image forming sectionwith the use of an electrophotographic method, an inkjet method or thelike by outputting image data of a document onto a recording paper(sheet). In addition, the image output apparatus 202 forms an imagebased on a file compressed by the image processing apparatus 100 on therecording paper (sheet).

The image display apparatus 203 is a display provided in an operationpanel (not shown) of the image forming apparatus or the like, and it ispossible to display a color image. In addition, the image displayapparatus 203 is covered by a touch panel and functions as the inputinterface of the image forming apparatus. In other words, the imagedisplay apparatus 203 displays a GUI (graphic user interface) and anoperation guide for performing the input of various commands to theimage forming apparatus.

The control section 101 is a computer including a processor such as aCPU (Central Processing Unit), DSP (Digital Signal Processor) or thelike, and controls each hardware included in the image formingapparatus. In addition, the control section 101 controls data transferbetween hardware units included in the image forming apparatus.

The storage device 102 is a hard disk, a solid-state drive or the like,and stores data or information used in the processing of the imageprocessing apparatus 100, or data or information after processing, whichis processed in the image processing apparatus 100.

The transmission/reception device 103 connects to a communication linesuch as a telephone line, Internet or the like, and transmits data toanother apparatus or receives from another apparatus which is connectedto the communication line.

The image processing apparatus 100 is configured by an ASIC (Applicationspecific integrated circuit), an FPGA (field-programmable gate array) orthe like for carrying out image processing to the inputted image data(image signal).

The image processing apparatus 100 includes, for example, an inputprocessing section 11, a document type automatic discrimination section12, a first compression section 13, a segmentation process section 14, asegmentation class signal compression section 15, a first decompressionsection 16, an image quality adjustment section 17, a color correctionsection 18, a black generation and under color removal section 19, aspatial filter section 20, a second compression section 21, an outputtone correction section 22, a halftone generation section 23, ansegmentation class signal decompression section 24, a seconddecompression section 25, a compression size calculation section 26 andthe like.

The image processing apparatus 100 transmits the image data subjected toimage processing to e-mail processing section (not shown) in the scan toe-mail mode among the image transmission modes. In addition, the imageprocessing apparatus 100 transmits the image data subjected to imageprocessing to a predetermined folder in the scan to ftp mode. Moreover,the image processing apparatus 100 transmits the image data subjected toimage processing to a predetermined USB memory in the scan to USB mode.Each section is described hereinafter.

An input processing section 11 has the function of applying a tonecorrection processing such as γ correction processing to the respectiveRGB image data inputted from an image input apparatus 201.

The document type automatic discrimination section 12 performsdetermination of a type of a document read by the image input apparatus201. The type of the document can be, for example, a text document, aprinted—picture document, a text printed—picture document having amixture of text and printed—picture(halftone photograph) or the like.

The document type automatic discrimination section 12 also performs ACS(Auto Color Selection) processing as the processing for discriminatingwhether the read document is a color document or a black-and-whitedocument, based on RGB data inputted from the input processing section11. The document type automatic discrimination section 12 may alsodetermine whether the read document is a blank page document or not.

The document type automatic discrimination section 12 outputs RGB imagedata to the first compression section 13 and the segmentation processsection 14. In the present embodiment, a value evaluated by the documenttype automatic discrimination section 12 for determining a document typeis stored into the storage device 102 and is used for calculating a sizeafter compression by a compression size calculation section 26 describedlater. The document type automatic discrimination section 12 isdescribed hereinafter in detail.

FIG. 2 is a block diagram showing an example of the configuration of thedocument type automatic discrimination section 12 according toEmbodiment 1. As shown in FIG. 2, the document type automaticdiscrimination section 12 includes a pixel determination section 121, ahistogram generation section 122, a background determination section123, an area pixel counting section 124, a document type determinationsection 125, a color pixel counting section 126, a color determinationsection 127 and the like. In addition, a size after compression iscalculated by using the value evaluated by the area pixel countingsection 124.

The pixel determination section 121 performs discrimination of eachpixel based on the pixel values of a plurality of pixels constituting animage. The discrimination of each pixel is performed on whether thepixel is a background pixel, a photograph pixel, a text pixel, or ahalftone dot pixel. In the present embodiment, for simplicity, the areapixel is also referred by grouping the background pixel, photographpixel, text pixel, halftone dot pixel and the like.

The discrimination of each pixel, that is, the algorithm for classifyingpixels of an image into segmented pixels can utilize the conventionalsegmentation method. For example, the type of a pixel can bediscriminated by the procedure as described hereinafter.

First, (1) a minimum density (pixel value) and a maximum density in apixel block by n×m (for example, 7 pixels×15 pixels) containing thetarget pixel are calculated. Next, (2) a maximum density difference iscalculated by using the calculated minimum density and maximum density.Next, (3) a total density busyness, which is the total of absolutevalues of density difference of pixels adjacent to the target pixel, iscalculated (for example, the sum of the values calculated with respectto a main scanning direction and a sub-scanning direction). Next, (4)the comparison between the calculated maximum density difference and amaximum density difference threshold value and the comparison betweenthe calculated total density busyness and a total density busynessthreshold value are performed.

Next, (5) in a case of the maximum density difference is smaller thanthe maximum density difference threshold value and the total densitybusyness is smaller than the total density busyness threshold value, itis determined that the target pixel belongs to a background/photographarea (continuous tone photograph area). (6) In a case where theabove-mentioned conditions are not fulfilled, it is determined that thetarget pixel belongs to a text/halftone dot area.

Next, (7) with regard to the pixel determined as belonging to thebackground/photograph area, when the target pixel meets the condition ofthe maximum density difference is smaller than a background/photographdetermination threshold value, the target pixel is determined as abackground pixel; and when the target pixel does not meet theabove-mentioned condition, the target pixel is determined as aphotograph pixel.

Next, (8) with regard to the pixel determined as belonging to thetext/halftone dot area, when the target pixel meets the condition of thetotal density busyness is smaller than the value obtained by multiplyinga maximum density difference and a text/halftone dot determiningthreshold value, the target pixel is determined as a text pixel; andwhen the target does not meet the above-mentioned condition, the targetpixel is determined as a halftone dot pixel. The above-mentionedprocedure is also described in Japanese Patent Application Laid-Open No.2002-232708.

The pixel determination section 121 determines whether each of thepixels constituting an image is a chromatic pixel or an achromaticpixel. The well-known color determination method (chromatic/achromaticdetermination method) can be used for an algorithm for colordetermination. For example, the method described in Japanese PatentApplication Laid-Open No. 2005-286571 or the like can be used. Moreover,in the description below, a processing example of using the RGB signalsis described, however, the CMY signals subjected to complementary colortransformation of the RGB signals can also be used. Alternatively, colorspace transformation can also be performed on the RGB signals into theCIE1976L*a*b*signals (CIE: Commission International de l' Eclairage, L*:luminosity, a*, b*: chromaticity) and then determination processing maybe carried out therefor. Signal conversion processing is carried outwhile the CMY signals subjected to complementary color transformation orthe CIE1976L*a*b*signals are used.

With regard to the procedure of color determination, first, (1) for RGBsignals, in a pixel block of n×m (for example, 3 pixels×3 pixels)centering around a target pixel, an average value is calculated for eachinput signal, and a maximum density difference value is evaluated basedon the maximum value and minimum value of the calculated average valueof each signal.

Next, (2) a comparison between the calculated maximum density differencevalue and a preset chromatic determination threshold value (for example,10 or the like) is performed. When the maximum density difference valueis larger than the chromatic determination threshold value, the targetpixel is determined as a chromatic pixel; and when the maximum densitydifference value is smaller than the chromatic determination thresholdvalue, the target pixel is determined as an achromatic pixel.

In addition, the processing at the pixel determination section 121 mayperform a pre-scan before a main scanning, and may perform a processingby using the image data temporarily stored in storage device such as ahard disk or the like.

The area pixel counting section 124 counts the number of area pixels(for example, the number of pixels of an image for one page) determinedby the pixel determination section 121. In other words, the area pixelcounting section 124 counts the number of background pixels, photographpixels, text pixels and halftone dot pixels, respectively, for an imageof each page.

The color pixel counting section 126 counts the number of chromaticpixels and achromatic pixels (for example, the number of chromatic orachromatic pixels of an image for one page) determined by the pixeldetermination section 121. In other words, the color pixel countingsection 126 counts the number of color pixels (also called the chromaticpixels) and black-and-white pixels (also called the achromatic pixels),respectively, for an image of each page.

In addition, with the present embodiment, the count values of the areapixels and the color pixels counted by the area pixel counting section124 and the color pixel counting section 126 are stored to be associatedwith the processing page in the storage device 102. The count valuestored in the storage device 102 is refereed by the compression sizecalculation section 26 mentioned later and used for calculating a sizeafter compression of each page.

The histogram generation section 122 compares an average value of everycolor component of background pixels with regard to the target pixeldetermined as a background pixel by the pixel determination section 121.The histogram generation section 122 calculates a minimum value of theaverage value of respective color components for each target pixel andthen generates a minimum value histogram. The number of density bins ofa histogram can be made to be sixteen, for example, a first density binwith the smallest pixel values, a second density bin with the nextsmallest pixel values, and a sixteenth density bin with the largestpixel values. However, it is not limited to this case.

The background determination section 123 determines the existence ornon-existence of a background.

FIG. 3 is an explanatory drawing showing an example of a minimum valuehistogram of background pixels by the background determination section123 according to Embodiment 1. FIG. 3A shows an example of a case wherebackground area exists, and FIG. 3B shows an example of a case wherebackground area does not exist. In FIG. 3, the horizontal axis indicatesa density for specifying a density bin, and the vertical axis indicatesa frequency as the frequency of the minimum value belonging to eachdensity.

Since a background area has only pixels with uniform density, in a caseof having a background, frequencies are centered on the limited group ofdensity bins (for example, centered on the density bins comprising onebin or two bins) as shown in FIG. 3A. On the other hand, in a case ofhaving no background, bins with values equal to or larger than a fixedvalue are distributed widely, as shown in FIG. 3B. In addition, in acase of having no background, it results in the distribution having nogroup of density bin with a large frequency, which is not illustrated.

The background determination section 123 determines that a background isexistence in a case of having a group of density bins with the frequencybeing larger than a background determination threshold value and thewidth of the density bin being smaller than a threshold value of thewidth of background determination bin (for example, three or the like).The background determination threshold value can be set, for example, as10000 when the output sheet size is presumed as an A4 size.

In addition, the lowest density bin value among a group of density binsdetermined as a background is called a background density value, and thetotal of the frequency belonging to the group of background density binsis called a background frequency. In addition, in a case of using RGBsignals, a pixel with a value close to “0” has higher actual density(the expression “density becomes lower” is used in the presentembodiment), and a pixel with a value close to “255” has lower density(the expression “density becomes higher” is used in the presentembodiment).

For example, the method described in Japanese Patent ApplicationLaid-Open No. 2000-354167 can also be used for determining backgroundpixels. In this method, firstly, a G signal is extracted from the inputimage data and then a histogram is created by, for example, dividing thedensity having 256 tone levels into 16 bins. In the area correspondingto a value equal to or larger than a minimum value (a first thresholdvalue) of the pixel values determined as background and a minimum value(a second threshold value) of the number of pixels determined as abackground, that is, the area considered as a background, a pixel withlower value is searched, and the density bin (class value) being equalto or more than the first threshold value is extracted as a background.

Moreover, instead of a G signal, a luminance component from RGBcomponents is calculated based on the conversion formula such as Yj=0.30Rj+0.59 Gj+0.11 Bj and then the calculated luminance signal may be used.Herein, Yj is a luminance component, and Rj, Gj and Bj are indicative ofrespective color components.

The document type determination section 125 determines a type of adocument. The document type determination compares the number of areapixels counted by the area pixel counting section 124 to thepredetermined threshold values corresponding to the background area,photograph area, halftone dot area and area, respectively, and thendetermines the type of the document.

For example, when the percentage of text pixels to the total number ofpixels is equal to or larger than 30%, the document can be determined asa text document. When the percentage of halftone dot pixels to the totalnumber of pixels is equal to or larger than 20%, the document can bedetermined as a halftone dot document. When the percentage of photographpixels to the total number of pixels is equal to or larger than 10%, thedocument can be determined as a photograph document.

If the percentages of text pixels and halftone dot pixels are equal toor larger than the respective thresholds values, the document isdetermined as a text/halftone dot document (text/printed−picturedocument). The above-mentioned method is an example. The determinationmay also be carried out by using a well-known identification techniquesuch as a support vector machine. In this case, the discrimination iscarried out in which image data of a document type which is determinedin advance is input as teaching data for learning.

The color determination section 127 determines whether the document is adocument to be processed as color with the use of the number of pixelscounted by the color pixel counting section 126 or a document to beprocessed as black-and-white (monochrome).

The color determination section 127 compares average values ofrespective color components of color pixels (chromatic pixel) determinedby the pixel determination section 121, calculates a minimum value ofthe average values of respective color components for each of the colorpixels, and generate a color pixel minimum value histogram.

The color determination section 127 determines whether the document is adocument to be processed as color or a document to be processed asmonochrome by making comparison between the number of color pixelscounted by the color pixel counting section 126 and a predeterminedcolor determination counting threshold value. With regard to thethreshold value used for determination, a threshold value may beprepared for each document size in advance. Alternatively, a standarddocument size may be set in advance, and a threshold value (resetthreshold value) depending on the standard document size may becalculated based on the proportion of an actual document size to thestandard document size and then be used.

In a case where the number of color pixels counted by the color pixelcounting section 126 is larger than a color determination countingthreshold value (when it is determined as a color document), it isdetermined whether the document is to be conclusively determined as acolor document in accordance with the determination result by thebackground determination section 123. For a document (a document withlarge portion of photographs such as a halftone photograph document,continuous tone photograph document, or the like) without the need of abackground removal processing, it is directly determined as a colordocument.

On the other hand, for a document (text document, document with a largeportion of text, though including photographs) requiring a backgroundremoval processing, a color pixel minimum value histogram generated bythe color determination section 127 is used, and then is determinedwhether the document has color pixels with smaller density than abackground density calculated by the background determination section123 or not. In a case of having no color pixels with smaller densitythan the background density, the document is determined as a monochromedocument (for example, a text document printed on a paper with colorbackground) because all color areas are removed by a background removalprocessing. In a case of having color pixels with larger density thanthe background density, the document is determined as a color document(a document to be color-copied) because color areas remain afterperforming a background removal processing.

FIG. 4 is a flowchart showing an example of a processing procedure fordetermining a type of a document by the document type automaticdiscrimination section 12 according to Embodiment 1. For theillustration of FIG. 4, the document type automatic discriminationsection 12 is called the discrimination section 12 for simplicity. Theprocessing shown in FIG. 4 is performed on an image of one page. In acase of image data obtained by reading a plurality of documents, theprocessing shown in FIG. 4 may be repeated for an image of each page(each document).

The discrimination section 12 determines an area pixel (S11), and thencounts the number of area pixels (S12). The area pixel is, for example,a background pixel, a photograph pixel, a text pixel, a halftone dotpixel or the like. The discrimination section 12 determines a colorpixel (S13), and then counts the number of color pixels (S14). Inaddition, the execution order for the processing of S11, S12 and theprocessing of S13, S14 is not limited to the example shown in FIG. 4,but the processing of S11, S12 and the processing of S13, S14 may beperformed in parallel.

The discrimination section 12 determines whether the processing for allpixels in an image is completed or not (S15). In a case where theprocessing for all pixels has not completed yet (S15: NO), theprocessing after Step S11 is repeated. In a case where the processingfor all pixels is completed (S15: YES), the discrimination section 12determines whether the pixels are background pixels or not (S16).

If the pixels are background pixels (S16: YES), the discriminationsection 12 creates (generates) a minimum value histogram (S17), andperforms background determination (S18). If the pixels are notbackground pixels (S16: NO), the discrimination section 12 performs theprocessing of Step S18 without performing the processing of Step S17.

The discrimination section 12 determines a document type (S19), anddetermines whether the document is a document which requires backgroundremoval or not (S20). If the document is a document which requiresbackground removal (S20: YES), the discrimination section 12 performsbackground removal processing (S21) and then completes the processing.If the document is a document which does not require background removal(S20: NO), the discrimination section 12 completes the processingwithout performing the processing of Step 21.

FIG. 5 is a flowchart showing an example of a processing procedure fordetermining a color document by the document type automaticdiscrimination section 12 according to the Embodiment 1. For theillustration of FIG. 5, the document type automatic discriminationsection 12 is called the discrimination section 12 for simplicity. Theprocessing shown in FIG. 5 is performed on an image of one page. In acase of image data obtained by reading a plurality of documents, theprocessing shown in FIG. 5 may be repeated for an image of each page. Inaddition, the processing shown in FIG. 5, for example, can be performedafter Step S19 shown in FIG. 4.

The discrimination section 12 determines whether the pixels are colorpixels or not (S31). If the pixels are color pixels (S31: YES), thediscrimination section 12 creates (generates) a color pixel minimumvalue histogram (S32) and determines whether the processing for allpixels of an image is completed or not (S33). If the pixels are notcolor pixels (S31: NO), the processing of Step S33 is performed withoutperforming the processing of Step S32.

The discrimination section 12 repeats the processing after Step 31 in acase where the processing for all pixels has not completed yet (S33:NO). In a case where the processing for all pixels is completed (S33:YES), the discrimination section 12 determines whether the color pixelcounting number (the number of color pixels counted) is larger than thecolor determination counting threshold value or not (S34).

The discrimination section 12 determines whether the document is adocument which requires background removal or not (S35) in a case wherethe color pixel counting number is larger than the color determinationcounting threshold value (S34: YES). In a case where the document is adocument which requires background removal (S35: YES), thediscrimination section 12 determines whether the document has colorpixels with smaller density than a background density or not (S36).

In a case of having color pixels with smaller density than a backgrounddensity (S36: YES), the discrimination section 12 determines thedocument is a document to be color-copied (S37) and then completes theprocessing. In a case where the document is not a document subjected tobackground removal (S35: NO), the discrimination section 12 performs theprocessing of Step S37 without performing the processing of Step S36.

In a case where the color pixel counting number is not larger than acolor determination counting threshold value (S34: NO) or in a case ofhaving no color pixels with smaller density than a background density(S36: NO), the discrimination section 12 determines the document is notto be color-copied (S38), and then completes the processing.

As described above, the document type automatic discrimination section12 functions as the pixel number calculation section for calculatingnumbers of text pixels and chromatic pixels in an image based on pixelvalues of a plurality of pixels constituting the image.

The segmentation process section 14 determines to which area such as ablack text area, a color text area, a halftone dot area, a photographarea (a continuous tone area) or the like each pixel of an image (imagedata) belongs with the use of a method equivalent to the pixeldetermination method employed by the pixel determination section 121.The determination result indicative of an area where each pixel belongsto, detected by the segmentation process section 14, is used forselecting a filter on a process by the spatial filter section 20described later as a segmentation class signal. Therefore, thesegmentation class signal is held to also include a position informationwhere a pixel exists and an area information where a pixel belongs to.In addition, on the document type automatic discrimination section 12,the positional information of pixels is not necessary as long as thenumber of discriminated pixels is obtained. In addition, thesegmentation process section 14 may determine in which area a pixelblock belongs for each pixel block consisting of a plurality of pixelsin place of the configuration for determining in which area a pixelbelongs for each pixel as described above.

The first compression section 13 performs encoding of image data (RGBsignal) outputted from the document type automatic discriminationsection 12. In addition, the encoding may be performed based on, forexample, the JPEG (Joint Photographic Experts Group) method.

The segmentation class signal compression section 15 performs encodingof a segmentation class signal outputted from the segmentation processsection 14. The encoding can be performed based on, for example, the MMR(Modified Modified READ (Relative Element Address Designate) method, MR(Modified READ (Relative Element Address Designate)) method or the likeas lossless compression.

Next, the temporary saving (storage) in the storage device 102 isdescribed. The control section 101 temporarily saves an encoded imagesignal (encoded image data) outputted from the first compression section13 and an encoded segmentation class signal (compressed segmentationclass signal) outputted from the segmentation class signal compressionsection 15 and controls to be read out in an arbitrarily timing. Sincethe present embodiment reads a plurality of documents and determines thesize after compression for an image of each page, the control section101 controls the later-stage processing (processing restart) not to beperformed until the information of all the documents is saved into thestorage device 102.

FIG. 6 is a flowchart showing an example of a procedure for theprocessing restart by the control section 101 according to Embodiment 1.The control section 101 saves (stores) image data (containing encodedimage data and compressed segmentation class signals) into the storagedevice 102 (S41). The control section 101 determines whether all theimage data of documents are saved into the storage device 102 or not(S42). In a case where all the image data of documents are not savedinto the storage device 102 (S42: NO), the processing of Step S41 isrepeated.

In a case where all the image data of documents are saved into thestorage device 102 (S42: YES), the control section 101 designates a filesize by requesting a user to input a conclusive file size (S43). Inaddition, as for the file size, in place of the configuration in whichthe user inputs the file size with an operation panel (not shown), avalue stored by an administrator in the image forming apparatus beforethe processing in FIG. 6 (for example, the value inputted from anoperation panel not shown) or the value set at the time of shipping orthe like of the image forming apparatus may be referred to.

The control section 101 determines a compression size of each page, thatis, a size after compression (S44). In addition, the determination of afile size after compression determines a size after compression of theimage of each page calculated by the compression size calculationsection 26 based on the file size inputted by a user and thediscrimination result of the document type automatic discriminationsection 12. Determination of a compression size is described below indetail.

The control section 101 performs a processing restart (S45), and thencompletes restart processing. In other words, in a case where sizesafter compression of image of each l page are determined, the controlsection 101 reads out the image data temporarily stored into the storagedevice 102, and performs a processing restart of outputting the readimage data to the first decompression section 16 and the segmentationclass signal decompression section 24 described later.

The first decompression section 16 applies decoding processing to anencoded image signal (encoded image data) so that the encoded imagesignal is decompressed to RGB image data.

The segmentation class signal decompression section 24 applies decodingprocessing to an encoded segmentation class signal (compressedsegmentation class signal). The segmentation class signal decompressionsection 24 outputs the decoded segmentation class signal to the spatialfilter section 20.

The image quality adjustment section 17 performs background removalcorrection on the RGB image data outputted from the first decompressionsection 16 in accordance with a background level detected by thedocument type automatic discrimination section 12. Moreover, the imagequality adjustment section 17 adjusts RGB balance (color adjustment withred color, blue color or the like), brightness, saturation or the likebased on the instructed setting information in a case where a userperforms instruction on image quality adjustment from an operation panel(not shown).

The processing of each section up to the image quality adjustmentsection 17 is similarly performed when an image is displayed on theimage display apparatus 203 and when print processing is performed bythe image output apparatus 202. In a case where print processing isperformed by the image output apparatus 202, unlike the case ofdisplaying an image on the image display apparatus 203, the valueevaluated for discriminating the document type by the document typeautomatic discrimination section 12 is not saved into the storage device102. In addition, the compression size calculation section 26, thesecond compression section 21, the second decompression section 25 donot operate (the processing is not performed).

For the processing in each section on and after the color correctionsection 18, displaying an image on the image display apparatus 203 andperforming a print processing by the image output apparatus 202 aredescribed separately. First, displaying an image on the image displayapparatus 203 is described.

The color correction section 18 applies processing that improves colorreproducibility for image data (RGB image data suitable to the readingcharacteristics of a scanner) outputted from the image qualityadjustment section 17. In other words, the color correction section 18performs color correction processing that converts image data into R′ G′B′ image data suitable to the display characteristics of the imagedisplay apparatus 203. In addition, the color correction processing maybe realized by creating an LUT (Look-Up Table) in which the input values(RGB) are associated with output values (R′ G′ B′), and by referring to(reading out) the output values from the LUT.

The black generation and under color removal section 19 does notoperate.

The spatial filter section 20 carries out spatial filter processing(edge enhancement processing, smoothing processing and the like) byselecting a filter coefficient in accordance with a segmentation classsignal for image data outputted from the color correction section 18.

The compression size calculation section 26 calculates a size aftercompression (data size) of an image of each page when the image data ofall documents are saved into the storage apparatus 102 and the filesizes are decided. In addition, the size after compression is alsoreferred as a compression size. In other words, the compression sizecalculation section 26 functions as a specifying section that specifiesthe respective amount of information of an image of each page. Also, thecompression size calculation section 26 functions as a compression sizecalculation section for calculating a size after compression of theimage of each page in accordance with the specified information amount.The amount of information of an image, for example, corresponds to aamount described such as text, figures or the like shown in a documentcorresponding to the image.

More specifically, the compression size calculation section 26 functionsas a weighting section that multiplies the number of text pixel and thenumber of chromatic pixel calculated by the document type automaticdiscrimination section 12, respectively, by predetermined weightingcoefficients, and specifies a weighted value as the amount ofinformation of an image.

FIG. 7 is an explanatory drawing showing an example of a method forspecifying an amount of information by the compression size calculationsection 26 according to Embodiment 1. As shown in FIG. 7, the numbers oftext pixels, chromatic pixels, halftone dot pixels, and photographpixels counted by the document type automatic discrimination section 12are represented by A, B, C and D, respectively; and the weightcoefficients corresponding to the numbers of text pixels, chromaticpixels, halftone dot pixels, and photograph pixels are represented byα(first weighting coefficient), β(second weighting coefficient), γ(thirdweighting coefficient) and δ(fourth weighting coefficient),respectively, for an image of an arbitrary page. The information amountE of the image of the page is calculated by the formulaE=α×A+β×B+γ×C+δ×D.

FIG. 8 is an explanatory drawing showing an example of the method forcalculating a compression size by the compression size calculationsection 26 according to Embodiment 1. With regard to the example shownin FIG. 8, it is assumed that the images over four pages are obtained byreading a plurality of documents (for example, four single-sided pagesor two double-sided pages). The information amounts of the 1^(st) to4^(th) pages are represented by E1, E2, E3 and E4, respectively. Sincethe amount of information of all four pages is equal to (E1+E2+E3+E4),the ratio of the amount of information for the 1^(st) to 4^(th) pages W1to W4 is expressed as W1=E1/(E1+E2+E3+E4), W2=E2/(E1+E2+E3+E4),W3=E3/(E1+E2+E3+E4), and W4=E4/(E1+E2+E3+E4), respectively.

Suppose that the file size specified by a user is represented by apredetermined size, the compression size (data size after compression)of an image of each page can be calculated by multiplying each of therespective predetermined sizes by the ratio. The compression size ofeach page is added up to be the predetermined size. In addition, asdescribed above, the predetermined size is not restricted to the valueinputted by an operation panel (not shown) from a user, but it may bethe value registered into the image forming apparatus by anadministrator in advance, or the value set at the timing of shipping ofthe image forming apparatus.

A concrete example is explained hereinafter. FIG. 9 is an explanatorydrawing showing an example of the number of area pixels over a pluralityof pages. FIG. 10 is a schematic view showing the amount of the imagesover a plurality of pages. FIG. 11 is an explanatory drawing showing anexample of compression sizes of the images over a plurality of pages. Asshown in FIG. 10, the image of the 1^(st) page has more description oftexts, while the images of the 2^(nd) and 3^(rd) pages have lessdescription of texts with relatively more blank areas. On the otherhand, the image of the 4^(th) page not just only has characters but alsodrawings such as color photographs or the like. In this case, as shownin FIG. 9, the number of text pixels in the image of the 1^(st) page isrelatively large, and the numbers of text pixels in the images at the2^(nd) and 3^(rd) pages are relatively small. On the other hand, thenumber of chromatic pixels in the image of the 4^(th) page is remarkablyincreased as compared with the other pages.

The above-mentioned weight coefficients α, β, γ and δ can be adjusted byperforming a comparison of image qualities or the like in advance andthen are stored into the image forming apparatus. Basically, a text areausually has a smaller proportion of the area of a document as comparedwith other areas such as a halftone dot area, however, in view of thetext information being the most essential in a text image, the weightcoefficient α is adjusted so as to be larger than the other weightcoefficients. In the example shown in FIG. 11, the weight coefficientsare set as α=1, β=0.5, γ=0.1, and δ=0.05, however, the weightcoefficients are not limited to these values.

The weighting coefficient can be switched in accordance with whethercolor scanning is designated or not. For example, β=0.5 can be set in acase that color scanning is designated, and β=0 can be set in a casethat color scanning is not designated.

The weight coefficients γ and δ are set to be smaller than the otherweighting coefficients α, β. Since the pixels in a halftone dot area anda photograph area are basically figure parts, even if the compressionratio of an image becomes larger, the visibility of the image does notchange a lot as compared with a text area or the like.

As shown in FIG. 11, in a case where the weighting coefficients α=1,β=0.5, γ=0.1, and δ=0.05 are set, the amount of information of each pageis calculated. With regard to the ratio of the amount of information ofeach page to the total amount of information of all pages, theproportion (ratio) of the image of the 1^(st) page is 0.31; that of the2^(nd) page is 0.11; that of the 3^(rd) page is 0.17; and that of the4^(th) page is 0.40. Suppose that the predetermined size (predeterminedfile size) is set as 2048 Kbyte, with regard to the compression size ineach page, the image of the 1^(st) page is 641 Kbyte; the image of the2^(nd) page is 226 Kbyte; the image of the 3^(rd) page is 352 Kbyte; andthe image of the 4^(th) page is 827 Kbyte.

In the above-mentioned example, the numbers of text pixels, color pixels(chromatic pixels), halftone dot pixels, and photograph pixels are usedas the amount of information of each page. However, with theconfiguration in which the halftone photograph pixels are regarded asnon-important information (for example, the apparatus directed to anoffice documents only), the numbers of text pixels, color pixels, andhalftone dot pixels may be used.

In addition, the weight coefficients other than the weight coefficient αmay be set as 0, only the number of pixels in a text area (text pixels)can be specified as the amount of information. Alternatively, theweighting coefficients other than the weighting coefficient β may be setas 0, and only the number of chromatic pixels can also be specified asthe amount of information.

FIG. 12 is a flowchart showing an example of the processing procedure bythe compression size calculation section 26 according to Embodiment 1.In the following, the compression size calculation section 26 isreferred as the calculation section 26 for simplicity. The calculationsection 26 specifies an amount of information of an image of the subjectpage (S51), and then determines whether the amount of information of animage of all pages are specified or not (S52). In addition, in thiscase, the specification of the amount of information includes weightingof the number of pixels.

In a case where the amount of information of all pages are not specified(S52: NO), the calculation section 26 continues to perform theprocessing at and after Step S51. In a case where the amount ofinformation of an image of all pages are specified (S52: YES), thecalculation section 26 calculates the ratio of the amount of informationin each page (S53). The ratio is the proportion of the amount ofinformation of the subject page with respect to the total amount ofinformation of all pages.

The calculation section 26 calculates a compression size (size aftercompression) of the image of each page in accordance with the calculatedratio (S54), and then completes the processing.

As described above, in a case where a document having a plurality ofpages is compressed to the specified file size (predetermined size), thesize after compression of each page corresponding to the amount ofinformation of each image of each page obtained by reading the documentis calculated. Since the respective images are compressed into thecalculated sizes and made into a file with the predetermined size, theimage quality of the image of each page can be equalized.

In addition, as the number of text pixels is used as the amount ofinformation, it is possible to assign a compression size so thatdegradation of text information by compression hardly occurs. By settingweight coefficients in particular, it is possible to calculate anappropriate compression size in accordance with the user's preference ordescription of a document.

In the above-mentioned embodiment, in a case where the compression sizeof the image at a given page calculated by the compression sizecalculation section 26 is too small as compared to the descriptionamount of the document on that page, it becomes difficult to identifythe content of the image at that page, therefore, outputting a warningmay be possible. The correlation between the amount of informationcorresponding to the description amount of a document and the minimumvalue of the compression sizes can be retained as a table, for example,a warning is outputted in a case where the calculated compression sizeis smaller than the minimum value for the amount of information of thecorresponding page. For example, in a case where images of ten pages arecompressed into one file, when the compression size is smaller than aminimum value, the images of ten pages may be divided and compressedinto two files by means of compressing images of five pages into onefile. In addition, in a case where the compression size is smaller thanthe minimum value, the specified file size may be modified.

The second compression section 21 encodes the image data outputted fromthe spatial filter section 22. In this case, since the secondcompression section 21 performs encoding in accordance with thecompression size calculated by the compression size calculation section26. A method such as JPEG2000 is used for the encoding by the secondcompression section 21 in which a data size after compression may bedesignated for encoding.

The control section 101 saves the image data compressed by the secondcompression section 21 into the storage device 102, converts the datainto a file format such as PDF (Portable Document Format) at the time ofcollecting all the encoded image data of a document, and transmits theconverted file to the destination specified in advance via thetransmission/reception device 103. In addition, the second compressionsection 21 outputs the encoded image data to the second decompressionsection 25 in a case where a preview display is required from a user inadvance.

The second decompression section 25 decodes the encoded image data bythe second compression section 21 and outputs the data to the imagedisplay apparatus 203 in a case where a user demands a preview. Thesecond decompression section 25 uses a decoding method corresponding tothe encoding method used at the second compression section 21.

The image forming apparatus according to the present embodiment causesthe image display apparatus 203 to display a preview of the image to betransmitted before executing transmission in the image transmissionmode.

The present embodiment shows a configuration that specifies an amount ofinformation of an image of each page and calculates a compression sizeof the image of each page based on the specified amount of informationfor a document with a plurality of pages read by the image inputapparatus 201, however, it is not limited to this case.

For example, a configuration that obtains the image data stored in amemory such as a USB (Universal Serial Bus) or the like, not a documentread by the image input apparatus 201, may be used. In this case, theimage processing apparatus 100 may be provided with a data inputterminal having an interface that connects to a data storage such as aUSB memory or SD card (Secure Digital Memory Card) for obtaining theimage data saved in the data storage, and a software processing sectionfor saving the image data sent from the data input terminal into astorage device temporarily and applying an image processing to the savedimage data. The software processing section is configured by a computerequipped with, for example, a CPU. The software processing sectionrealizes the processing similar to that of the document type automaticdiscrimination section 12, the color correction section 18, the spatialfilter section 20, the compression size calculation section 26 and thelike. The image data processed by the software processing section isstored in a data storage such as a USB memory specified by a user.

The following describes the processing from the color correction section18 through the halftone generation section 23, in which print processingis performed by the image output apparatus 202.

The color correction section 18 performs color correction processingthat converts the RGB image data outputted from the image qualityadjustment section 17 into CMY image data, and improves colorreproducibility to the image data.

The black generation and under color removal section 19 performs blackgeneration that creates black (K) image data from the outputted CMYimage data, which are outputted from the color correction section 18,while performing processing that generates new CMY image data bysubtracting the black (K) image data from the original CMY image data.Thereby, the CMY image data is converted to CMYK 4-color image data bythe black generation and under color removal section 19.

The spatial filter section 20 performs spatial filter processing (edgeenhancement processing, smoothing processing or the like) by a digitalfilter based on an segmentation class signal for the CMYK or CMY imagedata outputted from the black generation and under color removal section19.

The output tone correction section 22 performs an output γcorrectionprocessing onto the image data outputted from the spatial filter section20 for printing on a recording medium such as a paper or the like.

The halftone generation section 23 executes a required tone reproductionprocessing (half tone generation processing) for printing an image bythe image output apparatus 202 by using the error diffusion method ordither method. The halftone generation section 23 outputs CMYK or CMYimage data to the image output apparatus 202.

Embodiment 2

The above-mentioned Embodiment 1 uses the numbers of area pixels andvalues obtained by weighting pixels as the information amount of animage, however, it is not limited to this case. Embodiment 2 uses thetype of a document in place of the number of area pixels. In thisembodiment, the type of the document could be a color document or ablack-and-white (monochrome) document. The following describes thecontents different from Embodiment 1 and will not describe the contentssimilar to Embodiment 1.

As similar to Embodiment 1, a document type automatic discriminationsection 12 (document type determination section 125) determines a typewhether a document corresponding to the image of each page is in coloror black-and-white.

A compression size calculation section 26 specifies a type determined atthe document type automatic discrimination section 12 as the informationamount of the image at each page.

FIG. 13 is an explanatory drawing showing an example of a method forspecifying an information amount by the compression size calculationsection 26 according to Embodiment 2. The example shown in FIG. 13 is asubstitute of the example shown in FIG. 7 according to Embodiment 1. Asshown in FIG. 13, Pc represents the information amount in a case wherean image is a color document, and Pm represents the information amountin a case where an image is a black-and-white document.

FIG. 14 is an explanatory drawing showing an example of a method forcalculating a compression size by the compression size calculationsection 26 according to Embodiment 2. With the example shown in FIG. 14,images of four pages are obtained by reading a plurality of documents(for example, four single-sided pages or two double-sided pages). Inaddition, as shown in FIG. 14, the images of the 1^(st) and 4^(th) pagesare color documents, and the images of the 2^(nd) and 3^(rd) pages areblack-and-white documents. From the example shown in FIG. 13, the amountof information of the images of the 1^(st) and 4^(th) pages are Pc, andthe amount of information of the images of the 2^(nd) and 3^(rd) pagesare Pm.

Since the total amount of information of all four pages is 2×(Pc+Pm),the ratio of the amount of information in each of the 1^(st) to 4^(th)pages (W1˜W4) is W1=Pc/2×(Pc+Pm), W2=Pm/2×(Pc+Pm), W3=Pm/2×(Pc+Pm), andW4=Pc/2×(Pc+Pm), respectively.

Suppose that a file size designated by a user is represented by apredetermined size, a compression size (data size after compression) ofan image of each page can be calculated by multiplying a ratio by thepredetermined size.

For example, since a color document has 3-color information of RGB ascompared to a black-and-white document, in a case where the amount ofinformation Pm of a black-and-white document is represented by 1 forconvenience, it is possible to set Pc=3 as the amount of information Pcof a color document is three times larger than the amount of informationPm of a black-and-white document. In other words, in a case of Pc=3 andPm=1, the ratios W1 to Web 4 are W1=⅜, W2=⅛, W3=⅛, and W4=⅜,respectively. For example, suppose that a predetermined size is set as2048 Kbyte, with regard to the compression size of each page, each ofthe images of the 1^(st) and 4^(th) pages corresponds to 768 Kbyte, andeach of the images of the 2^(nd) and 3^(rd) pages corresponds to 256Kbyte. The values of the amount of information Pc and Pm are not limitedto the above-mentioned example.

As mentioned above, as the type of a document is specified as the amountof information, it is possible to assign a compression size so that thedegradation of color pages by compression does not worsen as compared toa black-and-white page.

Embodiment 3

Embodiment 3 takes both of the number of area pixels and the type of adocument into consideration as the amount of information of an image.

FIG. 15 is an explanatory drawing showing an example of the compressionsizes of images over a plurality of pages according to Embodiment 3. Asshown in FIG. 15, the amount of information based on the number of areapixels are 5915924 (Kbyte) in the 1^(st) page, 2089790 (Kbyte) in the2^(nd) page, 3253916 (Kbyte) in the 3^(rd) page, and 7630843 (Kbyte) inthe 4^(th) page, respectively. The amount of information of each page issimilar to the example shown in FIG. 11.

The 1^(st) and 4^(th) pages are color documents and the 2^(nd) and3^(rd) pages are black-and-white documents, as in the example shown inFIG. 14. The amount of information based on the type of a document isexpressed by a weighting coefficient in the example shown in FIG. 15,while the weighting coefficient is represented by 3 for a color document(corresponding to Pc) and the weighting coefficient is represented by 1for a black-and-white document (corresponding to Pm).

The amount of information taking a document type into account can becalculated by multiplying the amount of information based on the numberof pixels by a weighting coefficient. In the example shown in FIG. 15,the amount of information of the 1^(st) page is 17747772 (Kbyte); theamount of information of the 2^(nd) page is 2089790 (Kbyte); the amountof information of the 3^(rd) page is 3253916 (Kbyte); and the amount ofinformation of the 4^(th) page is 22892529 (Kbyte).

In this case, the ratio of each of the 1^(st) to 4^(th) pages is 0.39,0.05, 0.07 and 0.49 in order. Supposing that a predetermined size isrepresented by 2048 Kbyte, the compression sizes of the 1^(st) to 4^(th)pages are 798 Kbyte, 102 Kbyte, 143 Kbyte, and 1005 Kbyte in order.

In a case of using both the number of area pixels and the type of adocument as the amount of information, compared to the case of using thenumber of area pixels as the amount of information exemplified in FIG.11, the compression sizes on the 1^(st) and 4^(th) pages are increased,and the compression sizes on the 2^(nd) and 3^(rd) pages are decreased.As exemplified in FIG. 10, since the description amounts of thedocuments of the 1^(st) and 4^(th) pages are larger than those of thedocuments of the 2^(nd) and 3^(rd) pages, the image quality of each pagecan be equalized and the proportion of the compression size of adocument with more description amount or the amount of information canbe made larger so that the visibility of an image content can beimproved.

The Embodiments 1 to 3 can be realized through software with the use ofa CPU (Central Processing Unit). In this case, as shown in FIG. 16, theimage processing apparatus 100 includes a CPU for executing the commandof a program to realize each function, a ROM (Read Only Memory) forstoring the program, a RAM (Random Access Memory) for extending theprogram, a storage device (recording medium) such as memory for storingthe program and various types of data. A recording medium recording, tobe readable by a computer, the program code (executable program,intermediate code program, and source program) of the control program ofthe image processing apparatus 100 as a software to realize theabove-mentioned functions is provided to the CPU, and then the programcode recorded into the recording medium may be read and executed by thecomputer (or CPU and MPU).

For the recording medium, a non-transitory tangible medium, for example,a tape medium such as a magnetic tape, a cassette tape or the like; adisk medium including a magnetic disk such as a floppy (registeredtrademark) disk, a hard disk or the like, or an optical disk such as aCD-ROM, a MO, an MD, a DVD, a CD-R or the like; a card medium such as anIC card (inclusive of a memory card), an optical card or the like; asemiconductor memory medium such as a mask ROM, an EPROM, an EEPROM(registered trademark), a flash ROM or the like; or a logic circuit suchas a PLD (Programmable logic device), an FPGA (Field Programmable GateArray) or the like, may be used.

In addition, the image processing apparatus 100 is configured to beconnectable to a communication network, and the program code may beprovided through the communication network. It is to be noted that thecommunication network is not particularly limited as long as it iscapable of transmitting the program code. As the communication network,it is possible to use the Internet, an intranet, an extranet, a LAN, anISDN, a VAN, a CATV communication network, a Virtual Private Network, atelephone network, a mobile communication network, or a satellitecommunication network. In addition, a transmission medium constitutingthe communication network is not particularly limited to the specificconfiguration or type as long as a medium is capable of transmitting theprogram code. As the transmission medium, it is possible to use a wiredtype or a wireless type. The wired type includes an IEEE 1394, a USB, apower-line carrier, a cable TV line, a telephone line, an ADSL(Asymmetric Digital Subscriber Line) or the like. The wireless typeincludes an infrared ray of IrDA or a remote controller, Bluetooth(registered trademark), an IEEE 802.11 radio, an HDR (High Data Rate),an NFC (Near Field Communication), a DLNA (Digital Living NetworkAlliance), a mobile phone network, a satellite line, a terrestrialdigital network or the like. Technical features described in the aboveembodiments of the present invention can form a new technical solutionin combination with each other.

As this description may be embodied in several forms without departingfrom the spirit of essential characteristics thereof, the presentembodiments are therefore illustrative and not restrictive, since thescope of the invention is defined by the appended claims rather than bythe description preceding them, and all changes that fall within metesand bounds of the claims, or equivalence of such metes and boundsthereof are therefore intended to be embraced by the claims.

What is claimed is:
 1. An image processing apparatus including acompression processing section for compressing image data obtained byreading a plurality of documents into a file, comprising: a processorconfigured to: specify an amount of information of an image of each ofthe plurality of documents; calculate a size after compression of theimage in accordance with the amount of information of the entireplurality of documents and the amount of information of each documentspecified by the processor; calculate the number of text pixels andchromatic pixels of each image based on pixel values of a plurality ofpixels constituting each image; and multiply the number of text pixelsby a first weighting coefficient and multiply the number of chromaticpixels by a second weighting coefficient to add the results of themultiplication, wherein the image data is compressed by using the sizecalculated after compression, and the processor specifying a valueobtained by multiplying the number of text pixels by a first weightingcoefficient and multiply the number of chromatic pixels by a secondweighting coefficient to add the results of the multiplication as theamount of information.
 2. The image processing apparatus according toclaim 1, the processor further configured to: determine whether adocument corresponding to the image is a color document or ablack-and-white document, wherein the processor specifies the resultdetermined by whether a document corresponding to the image is a colordocument or a black-and-white document as the amount of information. 3.An image forming apparatus, comprising: the image processing apparatusaccording to claim 1; and the image processing apparatus forms an imagebased on the file compressed by the image processing apparatus onto asheet.
 4. A non-transitory computer-readable recording medium storing acomputer program for compressing image data obtained by reading aplurality of documents into a file, comprising the steps of: causing acomputer to specify an amount of information of an image of each of theplurality of documents; causing the computer to calculate a size aftercompression of the image in accordance with the specified amount ofinformation of the entire plurality of documents and the amount ofinformation of each document; causing the computer to compress the imagedata by using the calculated size after compression; causing a computerto calculate at least the number of text pixels and chromatic pixels ofeach image based on pixel values of a plurality of pixels constitutingeach image; and causing a computer to weight at least multiplying thenumber of text pixels by a first weighting coefficient and multiplyingthe number of chromatic pixels by a second weighting coefficient to addthe results of the multiplication, wherein the step of causing acomputer to specify performs a process to specify a value obtained bythe step of causing a computer to weight as the amount of information.